package com.lanou3g.web;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * If there are no bugs, it was created by Chen FengYao on 2018/5/28;
 * Otherwise, I don't know who created it either
 */
@WebServlet(name = "testServlet",urlPatterns = "/test.do")
public class TestServlet extends BaseServlet {
    private void show(HttpServletRequest req,
                      HttpServletResponse resp)
            throws IOException {

        String name = req.getParameter("name");
        resp.getWriter().println(name);
    }


    private void register(HttpServletRequest req,
                          HttpServletResponse resp)
        throws IOException{
        String username = req.getParameter("username");
        resp.getWriter().println(username);
    }
}
